<template>
  <view-layout-redirect
    :view-code="formCode"
    :stores="stores"
    :bpmOption="bpmOption"
    v-on="$listeners"/>
</template>

<script>

import ViewLayoutRedirect from "./ViewLayoutRedirect";

export default {
  name: 'BpmLayout',
  components: {
    ViewLayoutRedirect
  },
  props: {
    fks: {
      type: Array,
      default: () => []
    },
    parentValue: {
      type: Object,
      default: () => {
      }
    },
    stores: {
      type: Object,
      default: () => {
        return {}
      }
    },
    // 从 BpmMixin 复制 start
    bpmId: {
      type: String,
      default: null
    },
    bpmIdType: {
      type: String,
      default: null
    },
    processInstanceId: {
      type: String,
      default: null
    },
    processDefId: {
      type: String,
      default: null
    },
    getBpmOperateVoUrl: {
      type: String,
      default: null
    },
    formId: {
      type: String,
      default: null
    },
    formCode: {
      type: String,
      default: null
    },
    buttonDatas: {
      type: Object,
      default: () => {
      }
    },
    showCloseBut: {
      type: Boolean,
      default: false
    },
    processInstanceName: {
      type: String,
      default: ''
    },
    // 从 BpmMixin 复制 end
  },
  computed: {
    bpmOption() {
      return {
        bpmId: this.bpmId,
        bpmIdType: this.bpmIdType,
        processInstanceId: this.processInstanceId,
        processDefId: this.processDefId,
        getBpmOperateVoUrl: this.getBpmOperateVoUrl,
        formId: this.formId,
        formCode: this.formCode,
        buttonDatas: this.buttonDatas,
        showCloseBut: this.showCloseBut,
        processInstanceName: this.processInstanceName,
        fks: this.fks,
        parentValue: this.parentValue,
      }
    },
  },
  data() {
    return {}
  },
  methods: {},
  watch: {}
}
</script>
